package com.atguigu.paymentdemo.controller;

import com.atguigu.common.utils.R;
import com.atguigu.paymentdemo.config.WxPayConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/test")
public class TestController {

    @Autowired
    private WxPayConfig wxPayConfig;

    @GetMapping
    public R getWxPayConfig() {

        return R.ok().put("id", wxPayConfig.getMchId());
    }

}
